package com.web.bigdata.pojo;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.boot.autoconfigure.domain.EntityScan;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * <p>
 * 文章表
 * </p>
 *
 * @author FantJ
 * @since 2019-01-27
 */
@Data
@Table(name = "article")
@Entity
public class Article implements Serializable {
    @Id
    private String id;

    private String title;

    /**
     * 作者
     */
    private String userId;

    private String content;

    /**
     * 文章封面图
     */
    private String articleImg;

    /**
     * 文集id
     */
    private Integer articleCollectWorkId;

    /**
     * READY FAIL FINISH
     */
    private String status;

    private String articleTypeId;

    private Integer importance;
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;

}